package com.kkb.vo;

import java.util.List;

import com.github.pagehelper.PageInfo;
import lombok.Data;

/**
 * 结果集 VO
 *
 * @author ztranscript 2021/8/30 17:20
 **/
@Data
public class ResultVO<T> {
    private PageInfo<T> pageInfo;
    private List<T> list;
    private T obj;
    /**
     * 表示返回的状态码
     */
    private Integer code = 200;
    /**
     * 表示可以展示给用户的信息
     */
    private String msg = "ok";


    public ResultVO() {
    }

    public ResultVO(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ResultVO(PageInfo<T> pageInfo) {
        this.pageInfo = pageInfo;
    }

    public ResultVO(List<T> list) {
        this.list = list;
    }

    public ResultVO(T obj) {
        this.obj = obj;
    }
}
